﻿using DotNetSpeech;

namespace function
{
    public class read
    {
        private static SpVoice sp;

        public static void readtxt(string text)
        {
            if (sp == null)
                sp = new SpVoice();
            sp.Rate = 10;
            SpeechVoiceSpeakFlags sFlags = SpeechVoiceSpeakFlags.SVSFlagsAsync;
            sp.Speak(text, sFlags);
        }
    }
}